package api;

import java.security.NoSuchAlgorithmException;
import java.util.HashMap;

import beans.TemplatesBean;
import helper.JsonHelper;
import helper.WebHelper;

public class TemplateApi {
	public TemplatesBean GetTemplates(String url, String companyNo, String token, String privateKey) throws NoSuchAlgorithmException {
		HashMap<String, String> headers = WebHelper.GetHeaders(companyNo, token, privateKey);
		String res = WebHelper.SendGet(url,  "", headers);
		TemplatesBean info = JsonHelper.convertFromJsonToObject(res, TemplatesBean.class);
		return info;
	}
}
